package Chapter8;

//169页程序8.6

import java.awt.*;
import javax.swing.*;

public class FlowLayoutDemo {

    public static void main(String[] args) {
        FlowLayoutDemo that = new FlowLayoutDemo();
        that.go();
    }

    public void go() {
        JFrame frame = new JFrame("FlowLayout管理器测试程序");
        Container contentPane = frame.getContentPane();
        contentPane.setLayout(new FlowLayout());
        JButton button1 = new JButton("ok");
        JButton button2 = new JButton("open");
        JButton button3 = new JButton("close");
        contentPane.add(button1);
        contentPane.add(button2);
        contentPane.add(button3);
        frame.setBounds(600, 300, 300, 100);
        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}
